'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    // 为reconciliation_results表添加organization_id字段
    await queryInterface.addColumn('reconciliation_results', 'organization_id', {
      type: Sequelize.INTEGER,
      allowNull: false,
      defaultValue: 1, // 默认组织ID为1
      comment: '组织ID'
    });

    // 添加索引
    await queryInterface.addIndex('reconciliation_results', ['organization_id']);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn('reconciliation_results', 'organization_id');
  }
};